import logging, time, os
import sys
from enum import Enum

BASE_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(BASE_PATH)

# 定义日志文件路径
LOG_PATH = os.path.join(BASE_PATH, "log")
if not os.path.exists(LOG_PATH):
    os.mkdir(LOG_PATH)


class ContentType(Enum):
    '''
    常见的content-type的类型的枚举类
    '''
    APPLICATION_X_WWW_FORM_URLENCODE = "application/x-www-form-urlencoded; charset=UTF-8"
    MULTIPART_FORM_DATA = "multipart/form-data"
    APPLICATION_JSON = "application/json;charset=utf-8"
    TEXT_XML = "text/xml"
    APPLICATION_OCT_STREAM = "application/octet-stream"
    APPLICATION_FILE_UPLOAD = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"


#application/x-www-form-urlencoded
#multipart/form-data
#application/json
#text/xml
#application/octet-stream